// 此文件用于配置项和相关参数设置

//详情展示页
//基本信息 
//基础信息模块
const detailInfo = [{
        label: "设备名称",
        name: "deviceName",
        value: "1"
    }, {
        label: "固定资产编码",
        name: "fixAssetCode",
        value: "1"
    }, {
        label: "设备编号",
        name: "deviceNumber",
        value: "1"
    }, {
        label: "设备类别",
        name: "deviceType",
        value: "1"
    }, {
        label: "设备分类",
        name: "deviceClass",
        value: "1"
    }, {
        label: "使用部门",
        name: "useDepartment",
        value: "1"
    }, {
        label: "责任人",
        name: "responsible",
        value: "1"
    }, {
        label: "投产日期",
        name: "productDate",
        value: "1"
    }, {
        label: "出厂编号",
        name: "factoryNumber",
        value: "1"
    }, {
        label: "型号",
        name: "model",
        value: "1"
    }, {
        label: "设备原值",
        name: "deviceValue",
        value: "1"
    }, {
        label: "使用年限",
        name: "usedYears",
        value: "1"
    }

]
const broadInfo = [{

        label: "扩展字段1",
        name: "name",
        value: "1"
    },
    {
        label: "扩展字段2",
        name: "name",
        value: "1"
    },
    {
        label: "扩展字段3",
        name: "name",
        value: "1"
    },
    {
        label: "扩展字段4",
        name: "name",
        value: "1"
    },
    {
        label: "扩展字段5",
        name: "name",
        value: "1"
    },
    {
        label: "扩展字段6",
        name: "name",
        value: "1"
    },
    {
        label: "扩展字段7",
        name: "name",
        value: "1"
    },
    {
        label: "扩展字段7",
        name: "name",
        value: "1"
    },
    {
        label: "扩展字段8",
        name: "name",
        value: "1"
    },
    {
        label: "扩展字段9",
        name: "name",
        value: "1"
    },
    {
        label: "扩展字段10",
        name: "name",
        value: "1"
    },
    {
        label: "扩展字段11",
        name: "name",
        span: 24,
        value: "123456781234567812345678123456781234567812345678"
    }

]
const histroyShowInfo = [{
        label: "一级 1",

        children: [{
            label: "二级 1-1",
            imgSrc: "https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png",
        }, ],
    },
    {
        label: "一级 2",
        children: [{
                label: "二级 2-1",
                imgSrc: "https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png",
            },
            {
                label: "二级 2-2",
                imgSrc: "https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png",
            },
        ],
    },
    {
        label: "一级 3",
        children: [{
                label: "二级 3-1",
                imgSrc: "https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png",
            },
            {
                label: "二级 3-2",
                imgSrc: "https://panjiachen.gitee.io/vue-element-admin/static/img/404.a57b6f31.png",
            },
        ],
    },
]
const detailShowInfo = {
        detailInfo: detailInfo,
        broadInfo: broadInfo,
        histroyShowInfo: histroyShowInfo
    }
    // 基础信息表单配置
const formData = {
        title: '基础信息',
        formModel: {
            deviceId: "1",
            deviceName: "1",
            fixAssetCode: "1",
            deviceNumber: "1",
            deviceType: "1",
            deviceClass: '1',
            useDepartment: "1",
            responsible: "1",
            productDate: "1",
            factoryNumber: "1",
            model: "1",
            deviceValue: "1",
            mainDrawPath: ""
        },
        formComponent: [{
                type: 'input',
                label: '设备名称',
                model: 'deviceName',
                keyUpEnter: 'handleFilter',
                rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
            },
            {
                type: 'input',
                label: '固定资产编码',
                model: 'fixAssetCode',
                option: [1, 2, 3],
                rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]

            },
            {
                type: 'input',
                label: '设备编号',
                model: 'deviceNumber',
                format: 'yyyy-MM-dd',
                rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]

            },
            {
                type: 'select',
                label: '设备类型',
                model: 'deviceType',
                options: [{
                    label: "设备类型1",
                    value: "1"
                }, {
                    label: "设备类型2",
                    value: "2"
                }],
                rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
            },
            {
                type: 'select',
                label: '设备分类',
                model: 'deviceClass',
                options: [{
                    label: "设备分类1",
                    value: "1"
                }, {
                    label: "设备分类2",
                    value: "2"
                }],
                rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
            },
            {
                type: 'input',
                label: '使用部门',
                model: 'useDepartment',
                rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
            },
            {
                type: 'input',
                label: '责任人',
                model: 'responsible',
                rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
            },
            {
                type: 'datePicker',
                label: '投产日期',
                model: 'productDate',
                format: 'yyyy-MM-dd',
                rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
            },
            {
                type: 'input',
                label: '出厂编号',
                model: 'factoryNumber',
                format: 'yyyy-MM-dd',
                rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
            },
            {
                type: 'input',
                label: '型号',
                model: 'model',
                rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
            },
            {
                type: 'input',
                label: '设备原值',
                model: 'deviceValue',
                rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
            },
            {
                type: 'upload',
                label: '设备主图',
                model: 'deviceMainDrawPath',
                rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
            }
        ]
    }
    // 扩展字段信息
const broadData = {
        title: '扩展信息',
        formModel: {
            column1: "",
            column2: "",
            column3: "",
            column4: "",
            column5: "",
            column6: '',
            column7: "",
            column8: "",
            column9: "",
            column10: '',
            column11: "",
            column12: "",
            column13: "",
            column14: "",

        },
        formComponent: [{
            type: 'input',
            label: '归属部门',
            model: 'column1',
            keyUpEnter: 'handleFilter',
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
        }],
    }
    // 档案信息
const histroyInfo = {
        title: '档案信息',
        formModel: {
            fileTitle: ""
        },
        formComponent: [{
            type: 'upload',
            label: '设备档案',
            model: 'title',
            keyUpEnter: 'handleFilter',
            rules: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
        }]
    }
    //整理后的表单配置
const totalForm = [{
        formName: "基础信息",
        formRef: 'table1', //表单ref
        formModel: formData.formModel, //表单model
        formComponent: formData.formComponent,
        formName: formData.title //表单标题
    },
    {
        fromName: "扩展信息",
        formRef: 'table2', //表单ref
        formModel: broadData.formModel, //表单model
        formComponent: broadData.formComponent,
        formName: broadData.title //表单标题
    },
    {
        formName: "档案信息",
        formRef: 'table3', //表单ref
        formModel: histroyInfo.formModel, //表单model
        formComponent: histroyInfo.formComponent,
        formName: histroyInfo.title, //表单标题
        formStyle: "box-margin-card"
    }
]


const data = {

    totalForm: totalForm,
    //----------表单显示相关---------//
    detailShowInfo: detailShowInfo

}
export default data